#include"namepipe.hpp"
int main()
{Namepipe fifo(com_path,Creater);
 if(fifo.openforread())
   {
   cout<<"reception open name pipe done"<<endl;
   
   while(true)
   {
   string message;
   int n=fifo.readnamepipe(&message);
   if(n>0)
   {

   cout<<"send say>"<<message<<endl;
   }
   else if(n==0)
   {

   cout<<"send quit,reception too!"<<endl;
   break;



   }
   else 
   {

   cout<<"fifo.readnamepipe error"<<endl;
   break;


   }

   }

   
   }
}